public class Work81208 {
    public static void main(String[] args) {
        int[] a = new int[] {1,2,3,5,6,8,9,12,45,89,63,23,45,12,100,102,56,85,63,41};
        int max=a[0],max2=a[0];
        for (int b=0;b<a.length;b++){
           if (max<a[b]){
                max=a[b];
            }
        }
        for (int b=0;b<a.length;b++){
            if (a[b]>max2&&a[b]<max){
                max2=a[b];
         }
        }
       System.out.println("数组中第二大的数是"+max2);
    }
}
